import Vue from 'vue'
import VueRouter from 'vue-router'
import Recommend from '../views/Recommend.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Recommend',
    component: Recommend,
  },
  {
    path:"/hot",
    name:'Hot',
    component:()=>import('@/views/Hot'),
  },
  {
    path:"/catlist",
    name:"CatList",
    component:()=>import('@/views/CatList')
  },
  {
    path: '/video',
    name: 'Video',
    component: () => import('@/views/Video')
  },
  {
    path: '/search',
    name: 'Search',
    component: () => import('@/views/Search')
  },
  {
    path:'/playlist/:listid',
    name:"PlayList",
    meta:{hideNav:true},
    props:true,
    component:()=>import("@/views/PlayList")
  },
  {
    path:'/singer/:id',
    name:'Singer',
    meta:{hideNav:true},
    props:true,
    component: ()=>import('@/views/Singer.vue')
  },
  {
    path:`/catlist/:cat`,
    name:"Cat",
    meta:{hideNav:true},
    props:true,
    component:()=>import('@/views/Cat.vue')
  },
  {
    path:`/mv/:id`,
    name:"MV",
    meta:{hideNav:true},
    props:true,
    component:()=>import('@/views/MV.vue')
  }
  
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
});
export default router

